package com.scientific.research.gobang.controller;

import com.scientific.research.gobang.service.SubmitListService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

@RequestMapping("SubmitList")
@RestController//Rest是让所有方法的返回值都是JSON格式
public class SubmitListController {

    @Resource(name = "submitListServiceImpl")
    SubmitListService submitListService;

    @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
    @RequestMapping("GetRunCodeNum")
    public int GetRunCodeNum(@RequestBody Map map, HttpServletRequest request) {
        return submitListService.GetRunCodeNum(map, request);
    }

    //返回提交列表
    @SuppressWarnings("AlibabaLowerCamelCaseVariableNaming")
    @PostMapping("GetSubmitList")
    public List<Object> GetSubmitList(@RequestBody Map map) {
        return submitListService.GetSubmitList(map);
    }
}
